<div class="main">
	<div id="media_search">
		<form action="<?php echo base_url()."index.php/media/media_search"?>" method="get">
		<div id="search_condition">
			<div id="search_type">
				<ul class="search">
					<li class="on" data="common"><a href="javascript:void(0)">市区大牌</a></li>
					<li data="led"><a href="javascript:void(0)">LED大牌</a></li>
					<li data="highway"><a href="javascript:void(0)">高速大牌</a></li>
					<li data="airport"><a href="javascript:void(0)">机场媒体</a></li>
				</ul>
				<input type="hidden" name ="media_type" id="media_type" value="common" />
			</div>
			<div class="search_table">
				<div class="search_area">
						<div class="search_title">位　置：</div>
						<div class="search_content">
							<div class="area_list">
								<select  class="area_select" onchange="province_change()" id="province" name="province" >
									<option value="">请选择</option>
									<?php if ($regions) {
										foreach ($regions as $region){?><option value="<?php echo $region['region_id']?>" <?php echo $region['region_id']==$province?"selected='selected'":"";?>><?php echo $region['region_name']?></option><?php 
										};
									}?>
									
								</select>
							</div>
							<div class="area_list" id="city_zone">
							<?php if ($media_type=="common"||$media_type=="led") {
								$input_name ="city";
							}elseif ($media_type=="highway"){
								$input_name ="highway";
							}elseif ($media_type=="airport"){
								$input_name ="airport";
							}?>
								<select class="area_select" onchange="city_change()" id="city" name="<?php echo $input_name?>">
									<option value="">请选择</option>
									<?php if ($media_type=="common"||$media_type=="led") {?>
									<?php if ($citys) {
										foreach ($citys as $c){?><option value="<?php echo $c['region_id']?>" <?php echo $c['region_id']==$city?"selected='selected'":"";?>><?php echo $c['region_name']?></option><?php 
										};
									}?>
									<?php }elseif ($media_type=="highway"){
										foreach ($highways as $h){?><option value="<?php echo $h['highway_id']?>" <?php echo $h['highway_id']==$highway?"selected='selected'":"";?>><?php echo $h['highway_name']?></option><?php
										};
									} elseif ($media_type=="airport"){
										foreach ($airports as $a){?><option value="<?php echo $h['airport_id']?>" <?php echo $a['airport_id']==$airport?"selected='selected'":"";?>><?php echo $a['airport_name']?></option><?php
										};
									}?>
								</select>
							</div>
							<div class="area_list" id="area_zone">
								<select class="area_select"  id="area" name="area">
									<option value="">请选择</option>
									<?php if ($areas) {
										foreach ($areas as $a){?><option value="<?php echo $a['region_id']?>" <?php echo $a['region_id']==$area?"selected='selected'":"";?>><?php echo $a['region_name']?></option><?php 
										};
									}?>
								</select>
							</div>
							<script type="text/javascript">
								$(document).ready(function(){
									<?php if ($media_type=="highway") {?>
										$("#area_zone").hide();
										$("#city_zone").find(".chosen-container").css("width","220px");
										$("#city").trigger("chosen:updated");
									<?php }?>
									<?php if ($media_type=="airport") {?>
										$("#area_zone").hide();
										$("#city_zone").find(".chosen-container").css("width","220px");
										$("#city").trigger("chosen:updated");
									<?php }?>
								});
							</script>
						</div>
					</div>
				<div class="search_price">
					<div class="search_title">价　格：</div>
					<div class="search_content price">
						<div class="price_radio">
							<input type="radio" class="g_radio" name="price" <?php echo $price==="0"?"checked=\"checked\"":"";?>  id="price1" value="0"> <label for="price1"> 不限</label>
							<input type="radio" class="g_radio" name="price" <?php echo $price==="10-30"?"checked=\"checked\"":"";?> id ="price2" value="10-30"> <label for="price2"> 10-30万</label>
							<input type="radio" class="g_radio"  name="price" <?php echo $price==="30-50"?"checked=\"checked\"":"";?> id ="price3" value="30-50"> <label for="price3"> 30-50万</label>
							<input type="radio" class="g_radio"  name="price" <?php echo $price==="50-70"?"checked=\"checked\"":"";?>  id ="price4" value="50-70"> <label for="price4"> 50-70万</label>
							<input type="radio" class="g_radio"  name="price" <?php echo $price==="70-100"?"checked=\"checked\"":"";?>  id ="price5" value="70-100"> <label for="price5"> 70-100万</label>
						</div>
						<input type="text" placeholder="请输入价格范围" id="start_price" size="15" name="start_price" value="<?php echo $start_price?>"/> 至 
						<input type="text" placeholder="请输入价格范围" id="end_price" size="15" name="end_price" value="<?php echo $end_price?>" /> (万元)
					</div>
				</div>
			</div>
		</div>
		
		<div id="search_right">
			<input type="submit" class="search" value="">
			<a class="distribution_map"></a>
			<div></div>
			<div class="media_num_content"><span class="num"><?php echo number_format($statistics['city_num'],0,".",",")?></span>个城市，<span class="num"><?php echo number_format($statistics['media_num'],0,".",",")?></span>个户外媒体信息</div>
		</div>
		</form>
	</div>
		
	<div class="search_page">
		<div id="select" class="m" id="thirdtype|keycount|thirdtype|select">
				<div class="mt"><h1>市区大牌<strong>&nbsp;-&nbsp;媒体筛选</strong></h1></div>
				<div class="mc attrs">
				<?php if ($search_data['media_type_id']!=""||$search_data['env_type']!=""||$search_data['illumination']!="") {
				?>
					<div class="selected-c">
						<div class="attr">
							<div class="a-key">已选条件：</div>
							<div class="a-values">
								<div class="v-fold">
									<ul class="f-list">
										<?php if ($media_type_id !="") {
											$search_data1 =$search_data;
											$search_data1['media_type_id']="";
											?>
										<li ><a href="<?php echo "?".http_build_query($search_data1)?>">媒体形式：<strong><?php echo $selected_media_type_name?></strong><b></b></a></li>
										<?php }?>
										<?php if ($env_type !="") {
											$search_data1 =$search_data;
											$search_data1['env_type']="";
											?>
										<li ><a href="<?php echo "?".http_build_query($search_data1)?>">点位属性：<strong><?php echo $selected_env_name?></strong><b></b></a></li>
										<?php }?>
										<?php if ($illumination !="") {
											$search_data1 =$search_data;
											$search_data1['illumination']="";
											?>
										<li ><a href="<?php echo "?".http_build_query($search_data1)?>">点位属性：<strong><?php echo $illumination=="1"?"有":"无"?></strong><b></b></a></li>
										<?php }?>
									</ul>
								</div>
								<div class="v-option">
								<?php $search_data1 =$search_data;
								$search_data1['media_type_id']="";
								$search_data1['env_type']="";
								$search_data1['illumination']="";
									?>
									<a href="<?php echo "?".http_build_query($search_data1)?>"><span id="all-revocation">全部撤消</span></a>
								</div>
								
							</div>
						</div>
					</div>
				<?php }?>
				<div class="prop-attrs ">
					<div class="attr">
						<div class="a-key">媒体形式：</div>
						<div class="a-values">
							<div class="v-fold">
							<ul class="f-list">
							<?php if ($media_type_list) {
								$search_data1 =$search_data;
								foreach ($media_type_list as $mt){
								$search_data1['media_type_id']=$mt['media_type_id'];
								?><li class="mtl"><a href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $mt['media_type_id']==$media_type_id? 'class="on"':'';?>><?php echo $mt['media_type_name']?></a></li>
							<?php };
							}?> 
							</ul>
							</div>
							<div class="v-option"><span class="o-more" ><b></b>更多</span></div>
						</div>
					</div>
				</div>
				<div class="prop-attrs ">
					<div class="attr">
						<div class="a-key">点位属性：</div>
						<div class="a-values">
							<div class="v-fold">
							<?php $search_data1 =$search_data; ?>
							<ul class="f-list">
								<li><a
								<?php $search_data1['env_type']="circle";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="circle"? 'class="on"':'';?> >商圈</a></li>
								<li><a
								<?php $search_data1['env_type']="road";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="road"? 'class="on"':'';?>>市区主干道</a></li>
								<li><a
								<?php $search_data1['env_type']="market";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="market"? 'class="on"':'';?>>专业市场</a></li>
								<li><a
								<?php $search_data1['env_type']="venues";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="venues"? 'class="on"':'';?>>大型场馆</a></li>
									<li><a
								<?php $search_data1['env_type']="station";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="station"? 'class="on"':'';?>>火车站</a></li>
									<li><a
								<?php $search_data1['env_type']="stop";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="stop"? 'class="on"':'';?>>汽车站</a></li>
									<li><a
								<?php $search_data1['env_type']="cbd";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="cbd"? 'class="on"':'';?>>CBD</a></li>
									<li><a
								<?php $search_data1['env_type']="chief_district";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="chief_district"? 'class="on"':'';?>>政务区</a></li>
									<li><a
								<?php $search_data1['env_type']="industrial";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $env_type=="industrial"? 'class="on"':'';?>>工业区</a></li>
							</ul>
							</div>
							<div class="v-option"><span class="o-more" ><b></b>更多</span></div>
						</div>
					</div>
				</div>
				<div class="prop-attrs ">
					<div class="attr">
						<div class="a-key">照明情况：</div>
						<div class="a-values">
							<div class="v-fold">
							<?php $search_data1 =$search_data; ?>
							<ul class="f-list">
								<li><a
								<?php $search_data1['illumination']="1";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $illumination==="1"? 'class="on"':'';?>>有</a></li>
								<li><a
								<?php $search_data1['illumination']="0";?>
									href="<?php echo "?".http_build_query($search_data1)?>" <?php echo $illumination==="0"? 'class="on"':'';?>>无</a></li>
							</ul>
							</div>
						</div>
					</div>
				</div>
				<div id="advanced" class="mb" style="margin-bottom: 10px;">
				</div>
			</div>
		</div>
		<div id="filter">
			<div class="page_filter">
				<div class="title-key">广告牌浏览界面 Interface</div>
				<div class="title-value">
					<div class="col">
					<?php $search_data1 =$search_data; ?>
					每页显示 <a href="<?php $search_data1['page_size']=20 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==20?"class='on'":""?>>20</a> 
					<a href="<?php  $search_data1['page_size']=50 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==50?"class='on'":""?>>50</a> 
					<a href="<?php  $search_data1['page_size']=80 ;echo "?".http_build_query($search_data1)?>" <?php echo $page_size==80?"class='on'":""?>>80</a> 条
					</div>
					<div class="col switch"> 
						<ul>
							<?php $search_data1 =$search_data;
							 $search_data1['show_type']="media_search_grid";?>
							<li >
								<span class="icon-btn-switch grid_btn"><a href="<?php echo "?".http_build_query($search_data1)?>">大图</a></span>
							</li>
							<li class="selected" >
								<span class="icon-btn-switch list_btn"></span>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="fore1">
				<dl class="order"><dt>排序：</dt>
				<?php $search_data1 =$search_data; ?>
				<dd <?php echo $search_data['sort_by']=="reference_price"?"class=\"curr\"":"";?> ><a href="
				<?php  if ($search_data1['sort_by']=="reference_price") {
							if ($search_data1['sort_method']=="asc") {
								$search_data1['sort_method']="desc";
							}else{
								$search_data1['sort_method']="asc";
							}
						}else{
							$search_data1['sort_by']="reference_price";
							$search_data1['sort_method']="desc";
						}
						echo "?".http_build_query($search_data1);
				?>
				">价格</a></dd>
				<?php $search_data1 =$search_data; ?>
				<dd <?php echo $search_data['sort_by']=="specification"?"class=\"curr\"":"";?>><a href="<?php  
						if ($search_data1['sort_by']=="specification") {
							if ($search_data1['sort_method']=="asc") {
								$search_data1['sort_method']="desc";
							}else{
								$search_data1['sort_method']="asc";
							}
						}else{
							$search_data1['sort_by']="specification";
							$search_data1['sort_method']="desc";
						}
						echo "?".http_build_query($search_data1);
				?>" >面积</a></dd>
				</dl>
				<div class="pagin pagin-m"><span class="text"><i>1</i>/<?php echo $num_pages = ceil($num / $page_size);?></span>
				<?php echo $list_top_page_link?>
				</div>
				<div class="total"><span>共 <strong><?php echo $num?></strong> 个广告牌</span></div>
				<span class="clr"></span>
			</div>
		</div>
		<table id="plist">
			<thead>
				<tr>
					<td width="180px">媒体实景</td>
					<td width="">媒体位置</td>
					<td width="150px">媒体形式</td>
					<td width="150px">媒体面积</td>
					<td width="100px">刊例价</td>
					<td width="80px"></td>
				</tr>
			</thead>
			<tbody>
				<?php if ($media_list!=null) {
					foreach ($media_list as $media){?><li>
					<tr>
					<td class="media_icon"><a href=""><img src="<?php echo $this->config->item('ssi_pic_url').$media['pic'] ?>"/></a></td>
					<td class="media_title" align="left">
						<?php echo $media['location']?>
					</td>
					<td><?php echo $media['media_type_name']?></td>
					<td><?php echo $media['specification']?>平米</td>
					<td><?php echo $media['reference_price']?>万/年</td>
					<td>
						<div class="btns">
							<a id="coll1007947" href="javascript:void(0);" class="btn-coll"> + 收 藏 </a><br/>
							<a class="btn-compare btn-compare-s <?php if (in_array($media['media_id'], $contrast_media_id_list)) {
									echo "btn-compare-s-active";
								}?> " id="<?php echo $media['media_id']?>" ><span></span>对比</a></div>
					</td>
				</tr>
				<?php }
				}?>
				
				
			</tbody>
		</table>
		<div class="clear"></div>
		<div class="pager">
			<div class="pagin fr">
			<?php echo $bottom_page_link?>
			</div>
		</div>
	</div>